<?php

namespace App\Model;


/**
 * App\DistributorDevice
 *
 * @property int $id
 * @property int $distributor_id
 * @property int $device_id
 * @property int $profit 为我带来的收益
 * @property int $in_storeroom 在库
 * @property \Carbon\Carbon|null $created_at
 * @property \Carbon\Carbon|null $updated_at
 * @property-read \App\Model\Device $device
 * @property-read \App\Model\Distributors $distributor
 * @property int $orders_count
 */
class DistributorDevice extends Model
{
    public bool $timestamps = true;
    protected ?string $table = 'distributor_devices';

    protected array $fillable = [
        'profit', 'in_storeroom','distributor_id','device_id'
    ];

    protected array $casts = [

    ];

    public function device()
    {
        return $this->belongsTo(Device::class);
    }

}
